<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Make Controller Kit - Firmware API: error.h Source File</title>
<link href="mt_doxygen.css" rel="stylesheet" type="text/css" />
<link href="../resources/mt_doxytabs.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.header {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12pt;
	color: #222222;
}
-->
</style>
</head>

<body>
<table width="800" border="0">
    <tr>
      <td colspan="3">
        <form method="get" action="http://www.google.com/search">
          <div align="right">
            <input type="text"   name="q" size="25"
              maxlength="255" value="" />
            <input type="submit" value="Search" />
            <input type="hidden" name="sitesearch" value="makingthings.com/ref/firmware/html" />
          </div>
        </form>
       </td>
    </tr>
    <tr>
      <td><div align="center"><a href="http://www.makingthings.com">
				<img src="../resources/logo_brown_medium.png" alt="MakingThings"
									width="200" height="78" border="0" align="middle" longdesc="http://www.makingthings.com" /></a></div></td>
				<td><div align="center" class="header">
      		Make Controller Kit <br />
          Firmware API
      </div></td>
      <td><div align="center"><a href="http://www.makezine.com">
					<img src="../resources/make_logo.png" alt="MAKE Zine" 
										width="164" height="73" border="0" align="middle" longdesc="http://www.makezine.com" /></a></div></td>
    </tr>
</table>
</body>
</html>
<!-- Generated by Doxygen 1.5.4 -->
<script type="text/javascript">
<!--
function changeDisplayState (e){
  var num=this.id.replace(/[^[0-9]/g,'');
  var button=this.firstChild;
  var sectionDiv=document.getElementById('dynsection'+num);
  if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
    sectionDiv.style.display='block';
    button.src='open.gif';
  }else{
    sectionDiv.style.display='none';
    button.src='closed.gif';
  }
}
function initDynSections(){
  var divs=document.getElementsByTagName('div');
  var sectionCounter=1;
  for(var i=0;i<divs.length-1;i++){
    if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
      var header=divs[i];
      var section=divs[i+1];
      var button=header.firstChild;
      if (button!='IMG'){
        divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
        button=document.createElement('img');
        divs[i].insertBefore(button,divs[i].firstChild);
      }
      header.style.cursor='pointer';
      header.onclick=changeDisplayState;
      header.id='dynheader'+sectionCounter;
      button.src='closed.gif';
      section.id='dynsection'+sectionCounter;
      section.style.display='none';
      section.style.marginLeft='14px';
      sectionCounter++;
    }
  }
}
window.onload = initDynSections;
-->
</script>
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="classes.html"><span>Data&nbsp;Structures</span></a></li>
    <li class="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul>
</div>
<h1>error.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*********************************************************************************</span>
<a name="l00002"></a>00002 <span class="comment"></span>
<a name="l00003"></a>00003 <span class="comment"> Copyright 2006 MakingThings</span>
<a name="l00004"></a>00004 <span class="comment"></span>
<a name="l00005"></a>00005 <span class="comment"> Licensed under the Apache License, </span>
<a name="l00006"></a>00006 <span class="comment"> Version 2.0 (the "License"); you may not use this file except in compliance </span>
<a name="l00007"></a>00007 <span class="comment"> with the License. You may obtain a copy of the License at</span>
<a name="l00008"></a>00008 <span class="comment"></span>
<a name="l00009"></a>00009 <span class="comment"> http://www.apache.org/licenses/LICENSE-2.0 </span>
<a name="l00010"></a>00010 <span class="comment"> </span>
<a name="l00011"></a>00011 <span class="comment"> Unless required by applicable law or agreed to in writing, software distributed</span>
<a name="l00012"></a>00012 <span class="comment"> under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR</span>
<a name="l00013"></a>00013 <span class="comment"> CONDITIONS OF ANY KIND, either express or implied. See the License for</span>
<a name="l00014"></a>00014 <span class="comment"> the specific language governing permissions and limitations under the License.</span>
<a name="l00015"></a>00015 <span class="comment"></span>
<a name="l00016"></a>00016 <span class="comment">*********************************************************************************/</span>
<a name="l00017"></a>00017 
<a name="l00018"></a>00018 <span class="comment">/*</span>
<a name="l00019"></a>00019 <span class="comment">  error.h</span>
<a name="l00020"></a>00020 <span class="comment">  Error return codes.</span>
<a name="l00021"></a>00021 <span class="comment">*/</span>
<a name="l00022"></a>00022 
<a name="l00023"></a>00023 <span class="preprocessor">#ifndef ERROR_H</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define ERROR_H</span>
<a name="l00025"></a>00025 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00026"></a>00026 <span class="comment">/**</span>
<a name="l00027"></a>00027 <span class="comment">\defgroup Error Error Return Codes</span>
<a name="l00028"></a>00028 <span class="comment">Error return values for Make Controller API calls.</span>
<a name="l00029"></a>00029 <span class="comment">\ingroup Controller</span>
<a name="l00030"></a>00030 <span class="comment">@{</span>
<a name="l00031"></a>00031 <span class="comment">*/</span>
<a name="l00032"></a>00032 <span class="comment"></span>
<a name="l00033"></a>00033 <span class="comment">/** All's well here */</span>
<a name="l00034"></a><a class="code" href="group___error.html#gaa42bc036fbba18487ae9a15cd1f2f94">00034</a> <span class="preprocessor">#define CONTROLLER_OK                                0</span>
<a name="l00035"></a>00035 <span class="preprocessor"></span><span class="comment">/** Can't get a lock on a resource */</span>
<a name="l00036"></a><a class="code" href="group___error.html#g5317aab1608afa7507da0214aec0dbab">00036</a> <span class="preprocessor">#define CONTROLLER_ERROR_CANT_LOCK                  -1</span>
<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="comment">/** There are too many other users on this resource */</span>
<a name="l00038"></a><a class="code" href="group___error.html#ga8ab27cd6609bc4484546458cb266fa3">00038</a> <span class="preprocessor">#define CONTROLLER_ERROR_TOO_MANY_USERS             -2</span>
<a name="l00039"></a>00039 <span class="preprocessor"></span><span class="comment">/** This resource has already been stopped too many times */</span>
<a name="l00040"></a><a class="code" href="group___error.html#gbe5b0c7c2a59668cdeb433375f091c2a">00040</a> <span class="preprocessor">#define CONTROLLER_ERROR_TOO_MANY_STOPS             -3</span>
<a name="l00041"></a>00041 <span class="preprocessor"></span><span class="comment">/** Lock attempt was unsuccessful */</span>
<a name="l00042"></a><a class="code" href="group___error.html#g9ef65cc96e45d38307f661b86c330548">00042</a> <span class="preprocessor">#define CONTROLLER_ERROR_NOT_LOCKED                 -4</span>
<a name="l00043"></a>00043 <span class="preprocessor"></span><span class="comment">/** The requested index is not valid */</span>
<a name="l00044"></a><a class="code" href="group___error.html#g097f40c958abccd892d08f31b53c4dde">00044</a> <span class="preprocessor">#define CONTROLLER_ERROR_ILLEGAL_INDEX              -5</span>
<a name="l00045"></a>00045 <span class="preprocessor"></span><span class="comment">/** The requested ID is not valid */</span>
<a name="l00046"></a><a class="code" href="group___error.html#g530a1f85d5d8037398e1ed8a098e1e49">00046</a> <span class="preprocessor">#define CONTROLLER_ERROR_ILLEGAL_ID                 -6</span>
<a name="l00047"></a>00047 <span class="preprocessor"></span><span class="comment">/** Parameter is not valid */</span>
<a name="l00048"></a><a class="code" href="group___error.html#g7736777a3f60d07d1aa15dc68b563abc">00048</a> <span class="preprocessor">#define CONTROLLER_ERROR_ILLEGAL_PARAMETER_VALUE    -7</span>
<a name="l00049"></a>00049 <span class="preprocessor"></span><span class="comment">/** Resource is not open */</span>
<a name="l00050"></a><a class="code" href="group___error.html#g3242ff0737967942540ed2768872ca6e">00050</a> <span class="preprocessor">#define CONTROLLER_ERROR_NOT_OPEN                   -8</span>
<a name="l00051"></a>00051 <span class="preprocessor"></span><span class="comment">/** Not enough memory available */</span>
<a name="l00052"></a><a class="code" href="group___error.html#g2cd3e8ce9b1d59bb5bf2972ab35a8b48">00052</a> <span class="preprocessor">#define CONTROLLER_ERROR_INSUFFICIENT_RESOURCES     -9</span>
<a name="l00053"></a>00053 <span class="preprocessor"></span><span class="comment">/** Error reading data */</span>
<a name="l00054"></a><a class="code" href="group___error.html#gc07582f7dcf5e71e78f3134424ecfc5c">00054</a> <span class="preprocessor">#define CONTROLLER_ERROR_BAD_DATA                   -10</span>
<a name="l00055"></a>00055 <span class="preprocessor"></span><span class="comment">/** Not enough space for the requested operation */</span>
<a name="l00056"></a><a class="code" href="group___error.html#g45a21c9e9ccb9db83eb2cf7f6921d2fb">00056</a> <span class="preprocessor">#define CONTROLLER_ERROR_NO_SPACE                   -11</span>
<a name="l00057"></a>00057 <span class="preprocessor"></span><span class="comment">/** Resource is missing */</span>
<a name="l00058"></a><a class="code" href="group___error.html#g7495c452431132a3feeefee52ce69135">00058</a> <span class="preprocessor">#define CONTROLLER_ERROR_RESOURCE_MISSING           -12</span>
<a name="l00059"></a>00059 <span class="preprocessor"></span><span class="comment">/** Board doesn't have an address */</span>
<a name="l00060"></a><a class="code" href="group___error.html#gf0c0d854039c8ccbb5fed2a35ded843b">00060</a> <span class="preprocessor">#define CONTROLLER_ERROR_NO_ADDRESS                 -13</span>
<a name="l00061"></a>00061 <span class="preprocessor"></span><span class="comment">/** The operation has timed out */</span>
<a name="l00062"></a><a class="code" href="group___error.html#g5c95f2b95962f5011be19d6be2f71e57">00062</a> <span class="preprocessor">#define CONTROLLER_ERROR_TIMEOUT                    -14</span>
<a name="l00063"></a>00063 <span class="preprocessor"></span><span class="comment">/** Address is not valid */</span>
<a name="l00064"></a><a class="code" href="group___error.html#g2be559398e755ed852ac38d0670d4692">00064</a> <span class="preprocessor">#define CONTROLLER_ERROR_BAD_ADDRESS                -15</span>
<a name="l00065"></a>00065 <span class="preprocessor"></span><span class="comment">/** Data passed in the wrong format */</span>
<a name="l00066"></a><a class="code" href="group___error.html#g63cf0068b15b50e26b6f52c0914f968c">00066</a> <span class="preprocessor">#define CONTROLLER_ERROR_BAD_FORMAT                 -16</span>
<a name="l00067"></a>00067 <span class="preprocessor"></span><span class="comment">/** Couldn't complete operation because the subsystem is inactive */</span>
<a name="l00068"></a><a class="code" href="group___error.html#g11e238ec8f200a9a39f8f9ad077c7229">00068</a> <span class="preprocessor">#define CONTROLLER_ERROR_SUBSYSTEM_INACTIVE         -17</span>
<a name="l00069"></a>00069 <span class="preprocessor"></span><span class="comment">/** An error with the queue */</span>
<a name="l00070"></a><a class="code" href="group___error.html#g7f84a0c690875b21180d0177b6e23f42">00070</a> <span class="preprocessor">#define CONTROLLER_ERROR_QUEUE_ERROR                -18</span>
<a name="l00071"></a>00071 <span class="preprocessor"></span><span class="comment">/** Property specified is not valid */</span>
<a name="l00072"></a><a class="code" href="group___error.html#g1eef1eb7b55330584d5119c8283b0d0f">00072</a> <span class="preprocessor">#define CONTROLLER_ERROR_UNKNOWN_PROPERTY           -19</span>
<a name="l00073"></a>00073 <span class="preprocessor"></span><span class="comment">/** OSC data type is not valid */</span>
<a name="l00074"></a><a class="code" href="group___error.html#g80c66236574d73ade9c2ef53e5e4200b">00074</a> <span class="preprocessor">#define CONTROLLER_ERROR_INCORRECT_DATA_TYPE        -20</span>
<a name="l00075"></a>00075 <span class="preprocessor"></span><span class="comment">/** Couldn't find the type tag in this OSC message */</span>
<a name="l00076"></a><a class="code" href="group___error.html#g2a3701fc1ba39056b9926cfab8c622f4">00076</a> <span class="preprocessor">#define CONTROLLER_ERROR_NO_TYPE_TAG                -21</span>
<a name="l00077"></a>00077 <span class="preprocessor"></span><span class="comment">/** No OSC property specified */</span>
<a name="l00078"></a><a class="code" href="group___error.html#gb3106333ec6e45c789ae5cef04cceba2">00078</a> <span class="preprocessor">#define CONTROLLER_ERROR_NO_PROPERTY                -22</span>
<a name="l00079"></a>00079 <span class="preprocessor"></span><span class="comment">/** The network is not up */</span>
<a name="l00080"></a><a class="code" href="group___error.html#g5247299a6a6caa7c59f0e222476f63a0">00080</a> <span class="preprocessor">#define CONTROLLER_ERROR_NO_NETWORK                 -23</span>
<a name="l00081"></a>00081 <span class="preprocessor"></span><span class="comment">/** Specified string is too long */</span>
<a name="l00082"></a><a class="code" href="group___error.html#gb5e5ae7f5607418082cf8d9c09a06ef2">00082</a> <span class="preprocessor">#define CONTROLLER_ERROR_STRING_TOO_LONG            -24</span>
<a name="l00083"></a>00083 <span class="preprocessor"></span><span class="comment">/** The system is not active */</span>
<a name="l00084"></a><a class="code" href="group___error.html#gfc2b28a46b3f3dc2842045ee161c0b14">00084</a> <span class="preprocessor">#define CONTROLLER_ERROR_SYSTEM_NOT_ACTIVE          -25</span>
<a name="l00085"></a>00085 <span class="preprocessor"></span><span class="comment">/** A requested write was unsuccessful */</span>
<a name="l00086"></a><a class="code" href="group___error.html#g34e5fdb1fb03c91af6780755b46268f0">00086</a> <span class="preprocessor">#define CONTROLLER_ERROR_WRITE_FAILED               -26</span>
<a name="l00087"></a>00087 <span class="preprocessor"></span><span class="comment">/** Not enough memory available for the requested operation */</span>
<a name="l00088"></a><a class="code" href="group___error.html#gb56f9fc0d3c05e3b098d4f3304ada577">00088</a> <span class="preprocessor">#define CONTROLLER_ERROR_INSUFFICIENT_MEMORY        -27</span>
<a name="l00089"></a>00089 <span class="preprocessor"></span><span class="comment">/** Task did not start successfully */</span>
<a name="l00090"></a><a class="code" href="group___error.html#g8ab075cae3562308100cdea4dc66f4bb">00090</a> <span class="preprocessor">#define CONTROLLER_ERROR_CANT_START_TASK            -28</span>
<a name="l00091"></a>00091 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00092"></a>00092 <span class="comment">/** Unexpected count returned */</span>
<a name="l00093"></a><a class="code" href="group___error.html#g7ff2140666f9c25b2cb8f8e409c8c65b">00093</a> <span class="preprocessor">#define CONTROLLER_ERROR_COUNT_MISMATCH             -100</span>
<a name="l00094"></a>00094 <span class="preprocessor"></span><span class="comment">/** Requested operation failed to start */</span>
<a name="l00095"></a><a class="code" href="group___error.html#gdd556ea9aa63483568577a6dd838cfc4">00095</a> <span class="preprocessor">#define CONTROLLER_ERROR_START_FAILED               -101</span>
<a name="l00096"></a>00096 <span class="preprocessor"></span><span class="comment">/** Requested stop operation failed */</span>
<a name="l00097"></a><a class="code" href="group___error.html#g1b0dceb6dfebbee79600d5a8852b19b5">00097</a> <span class="preprocessor">#define CONTROLLER_ERROR_STOP_FAILED                -102</span>
<a name="l00098"></a>00098 <span class="preprocessor"></span><span class="comment">/** The user count is not valid */</span>
<a name="l00099"></a><a class="code" href="group___error.html#g50cb816a9e035023f81163cf32d57eb7">00099</a> <span class="preprocessor">#define CONTROLLER_ERROR_WRONG_USER_COUNT           -103</span>
<a name="l00100"></a>00100 <span class="preprocessor"></span><span class="comment">/** A data structure's size was not valid */</span>
<a name="l00101"></a><a class="code" href="group___error.html#g70451c8eda1ef28dcbfd63037e1c36c7">00101</a> <span class="preprocessor">#define CONTROLLER_ERROR_DATA_STRUCTURE_SIZE_WRONG  -104</span>
<a name="l00102"></a>00102 <span class="preprocessor"></span><span class="comment">/** Initialization was not successful */</span>
<a name="l00103"></a><a class="code" href="group___error.html#gd65de466c0947e51397985f859dd3984">00103</a> <span class="preprocessor">#define CONTROLLER_ERROR_INCORRECT_INIT             -105</span>
<a name="l00104"></a>00104 <span class="preprocessor"></span><span class="comment">/** De-initialization was not successful */</span>
<a name="l00105"></a><a class="code" href="group___error.html#gffb6cefc73e0510998d8d12ffb4f121b">00105</a> <span class="preprocessor">#define CONTROLLER_ERROR_INCORRECT_DEINIT           -106</span>
<a name="l00106"></a>00106 <span class="preprocessor"></span><span class="comment">/** An error occurred while trying to lock */</span>
<a name="l00107"></a><a class="code" href="group___error.html#g266dd00cf91a01e73619d6e6b2c5ed83">00107</a> <span class="preprocessor">#define CONTROLLER_ERROR_LOCK_ERROR                 -107</span>
<a name="l00108"></a>00108 <span class="preprocessor"></span><span class="comment">/** An error occurred when granting a lock */</span>
<a name="l00109"></a><a class="code" href="group___error.html#g1e3d524f9b9151318b09d3c0abf19927">00109</a> <span class="preprocessor">#define CONTROLLER_ERROR_LOCK_GRANTED_ERROR         -108</span>
<a name="l00110"></a>00110 <span class="preprocessor"></span><span class="comment">/** A use error occurred */</span>
<a name="l00111"></a><a class="code" href="group___error.html#g68e725870f6eeac024e64548011e5de3">00111</a> <span class="preprocessor">#define CONTROLLER_ERROR_USE_GRANTED_ERROR          -109</span>
<a name="l00112"></a>00112 <span class="preprocessor"></span><span class="comment">/** Initialization was not successful */</span>
<a name="l00113"></a><a class="code" href="group___error.html#g5f37a5232495c3256a8d0f9fbfeb3d9d">00113</a> <span class="preprocessor">#define CONTROLLER_ERROR_INITIALIZATION             -110</span>
<a name="l00114"></a>00114 <span class="preprocessor"></span>
<a name="l00115"></a>00115 <span class="comment">/* @} */</span>
<a name="l00116"></a>00116 <span class="preprocessor">#endif // ERROR_H</span>
<a name="l00117"></a>00117 <span class="preprocessor"></span>
<a name="l00118"></a>00118 
</pre></div><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Make Controller Kit</title>
<style type="text/css">
<!--
.footer {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 9pt;
	color: #999999;
}
-->
</style>
</head>

<body>
<hr size="1">
<div>
  <p class="footer">The Make Controller Kit is an open source project maintained by <a href="http://www.makingthings.com">MakingThings</a>.<br />
    MakingThings code is released under the <a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">Apache 2.0 license</a>.<br />
    Bug tracker, development wiki and status can be found at <a href="http://dev.makingthings.com">http://dev.makingthings.com</a>.<br />
		This document was last updated on 5 Dec 2007.
</p>
</div>
<!-- Google Analytics Code -->
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-769030-1";
urchinTracker();
</script>
</body>
</html>
